/**
 * Created by Administrator on 2016/8/5.
 */
var $ = require('jquery');
var Meta = require('../../chatInfo');
var type = Meta.type;

exports.create = function ($parent, tabType) {
  console.log('Meta类型', type);
  var $clueTabs = createTabs(tabType || type);
  $parent.append($clueTabs);
  return $clueTabs;
};


function createTabs(clueType) {
  var $html;
  switch (clueType) {
    case 'inquiry':
      $html = $('<li class="col-xs-4 tab-item" data-tab="inquiry">' +
        '<div class="tab-content current">询价单信息</div></li>' +
        '<li class="col-xs-4 tab-item" data-tab="order">' +
        '<div class="tab-content not-current">订单信息</div></li>'+
      '<li class="col-xs-4 tab-item" data-tab="store">' +
        '<div class="tab-content not-current">供应商信息</div></li>');
      break;
    case 'order':
      $html = $('<li class="col-xs-6 tab-item" data-tab="order">' +
        '<div class="tab-content current">订单信息</div></li>' +
        '<li class="col-xs-6 tab-item" data-tab="store">' +
        '<div class="tab-content not-current">供应商信息</div></li>');
      break;
    case 'product':
      $html = $('<li class="col-xs-6 tab-item" data-tab="product">' +
        '<div class="tab-content current">商品信息</div></li>' +
        '<li class="col-xs-6 tab-item" data-tab="store">' +
        '<div class="tab-content not-current">供应商信息</div></li>');
      break;
    case 'store':
      $html = $('<li class="col-xs-12 tab-item" data-tab="store">' +
        '<div class="tab-content current">店铺信息</div></li>');
      break;
    default:
      break;
  }
  return $html;
}


